package com.nhjf.model.payLog;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.coursesSeries.CoursesSeries;
import com.nhjf.model.system.User;

@SuppressWarnings("serial")
@Entity
@Table(name = "payOrder")
public class PayLog extends BaseModel{
	/**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	 * 账号id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	private User user;
	/**
	 * 系列课id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "coursesSeriesId")
	private CoursesSeries coursesSeries;
	/**
	 * 支付类型（1微信支付2支付宝）
	 */
	@Column(name = "payType")
	private Integer payType;
	
	/**
	 * 人民币单位分
	 */
	@Column(name = "money")
	private Integer money;
	/**
	 * 传参
	 */
	@Column(name = "parameters")
	private String parameters;
	/**
	 * 创建时间
	 */
	@Column(name = "createTime")
	private Date createTime;
	/**
	 * 支付状态，1未支付，2已支付，3支付失败
	 */
	@Column(name = "status")
	private Integer status;
	/**
	 * 支付成功时间
	 */
	@Column(name = "paymentSuccessfulTime")
	private Date paymentSuccessfulTime;
	
	@Transient
	private String createDate;
	
	public String getCreateDate() {
		return createDate;
	}
	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public CoursesSeries getCoursesSeries() {
		return coursesSeries;
	}
	public void setCoursesSeries(CoursesSeries coursesSeries) {
		this.coursesSeries = coursesSeries;
	}
	public Integer getPayType() {
		return payType;
	}
	public void setPayType(Integer payType) {
		this.payType = payType;
	}
	public String getParameters() {
		return parameters;
	}
	public void setParameters(String parameters) {
		this.parameters = parameters;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getPaymentSuccessfulTime() {
		return paymentSuccessfulTime;
	}
	public void setPaymentSuccessfulTime(Date paymentSuccessfulTime) {
		this.paymentSuccessfulTime = paymentSuccessfulTime;
	}
	public Integer getMoney() {
		return money;
	}
	public void setMoney(Integer money) {
		this.money = money;
	}

	
}
